$(function() {
    qryParametrosProcesos();
});

function qryParametrosProcesos() {
    var dataTable = {
	tabla : "qryParametrosProceso",
	ordenaPor : new Array([ 0, "desc" ]),
	desactOrdenaEn : [ 1, 2 ],
	filsXpag : 4
    };
    paginaDataTable(dataTable);
};

// EXPANDIR/CONTRAER ACCORDION
$(function(){
	   $('#expandAccordion').click(function() {
	       var newstate = $(this).attr('state') ^ 1,
	           icon = newstate ? "minus" : "plus",
	           text = newstate ? "Contraer" : "Expandir";
	       
	       // if state=0, show all the accordion divs within the same block (in this case, within the same section)
	       if ( $(this).attr('state')==="0" ) {	        	        
	           $('div.accordion-body:not(.in)').collapse('show');
	       }
	       // otherwise, collapse all the divs
	       else {	        
	           $('div.accordion-body.in').collapse('hide');
	       }

	       $(this).html("<i class=\"icon-white icon-" + icon + "-sign\"></i> " + text +" todo");
	       $(this).attr('state',newstate);

	   });
	   //http://jsfiddle.net/jhfrench/mc4Qd/
});

